<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<c:set var="srcPath" value="${redis:getSysConfig('sysFileVisitRoot_back')}"/>
<c:set var="uploadPath" value="${redis:getSysConfig('uploadFileVisitRoot')}"/>
<script type="text/javascript">
    /**
     * 查看分类详情
     */
    function detailInfo(id){
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/evalGoods/getEvaluateGoods.sjson",
            data: {evaluateId:id},
            success: function(result){
                var data = JSON.parse(result.data);
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTable");
                /**设置展示信息**/
                $("#d_photo").html("<img id='uploadImg_detail_"+id+"' class='uploadImg' onMouseOver='showDetailBigImage("+id+",3,3,0)'  onMouseOut='showDetailRebackImage("+id+",1,1)' src='${uploadPath}/"+data.logoImg+"' onerror='this.src=\"${srcPath}/common/images/mrbj.png\"' width='50px' height='50px' />");
                $("#d_ordersNo").html(data.ordersNo);
                $("#d_productFullName").html(data.productFullName);
                $("#d_salesPrice").html(data.salesPrice.toFixed(2));
                if(data.level==1){
                    $("#d_level").html("<span class='color_001'>好评</span>");
                }else if(data.level==0){
                    $("#d_level").html("<span class='color_003'>中评</span>");
                }else if(data.level==-1){
                    $("#d_level").html("<span class='color_002'>差评</span>");
                }
                $("#d_content").html(data.content);

                if(data.isAnonymous==0){
                    $("#d_isAnonymous").html("<span class='color_002'>否</span>");
                }else if(data.isAnonymous==1){
                    $("#d_isAnonymous").html("<span class='color_001'>是</span>");
                }

                if(data.createTime!=""&&data.createTime!=undefined){
                    $("#d_createTime").html(new Date(data.createTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
                $("#d_shopName").html(data.shopName);
                $("#d_appraiserName").html(data.appraiserName);
                if(data.evaluateState==0){
                    $("#d_evaluateState").html("<span class='color_001'>正常显示</span>");
                }else if(data.evaluateState==1){
                    $("#d_evaluateState").html("<span class='color_002'>禁止显示</span>");
                }
                $("#d_remark").html(data.remark);
            }
        });
    }
</script>

<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">评价详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">商品图片:</td>
						<td class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_photo"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">订单号:</td>
						<td class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_ordersNo"></span></td>
						<td class="toright_td" width="150px">店铺名称:</td>
						<td class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_shopName"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">商品名称:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_productFullName"></span></td>
						<td class="toright_td" width="150px">销售价格:</td>
						<td class="toleft_td">&nbsp;&nbsp;￥<span id="d_salesPrice"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">评价等级:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_level"></span></td>
						<td class="toright_td" width="150px">评价状态:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_evaluateState"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">评价人:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_appraiserName"></span></td>
						<td class="toright_td" width="150px">评价时间:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_createTime"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">是否匿名评价:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_isAnonymous"></span></td>
						<td class="toright_td" width="150px">评价处理备注:</td>
						<td class="toleft_td">&nbsp;&nbsp;<span id="d_remark"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">评价内容:</td>
						<td class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_content"></span></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>